package com.michaelwolf.mytool.wcfcompmanger.ui;

import org.w3c.dom.Node;

public class WCFNodeObject {
	private String tagName;
	private String displayName;
	private Node node;
	private String searchWord;
	private String moduleName;

	public WCFNodeObject(Node compNode, String searchWord, String moduleName) {
		tagName = compNode.getNodeName();
		if(tagName.equals("type-mapping")){
			displayName = "datatype="+compNode.getAttributes().getNamedItem("data-type")
					.getNodeValue();
		}else{
			displayName = compNode.getAttributes().getNamedItem("display-name")
					.getNodeValue();
		}
		
		
		node = compNode;
		this.moduleName = moduleName;
		this.searchWord = searchWord;
	}

	public Node getNode() {
		return node;
	}

	public String getSearchWord() {
		return searchWord;
	}

	public String toString() {
		return "<" + tagName + " " + displayName + ">";
	}

	public String getModuleName() {
		return moduleName;
	}
	
	

}
